define(function (require, exports, module) {
    exports.init = function () {
        getUserName();

        getSumOfMoney();
    };
});

//获取登录者的名字
function getUserName() {
    $.get("/myBank10/user/UserController/getUserInfo", function (result) {
        if (result.STATUS == "SUCCESS") {
            $("#username").text(result.name);
        } else {
            alert("失败");
        }
    });
}

function getSumOfMoney() {
    $.get("/myBank10/myPayment/MyPayController/getSumOfMoney", function (result) {
        if (result.STATUS == "SUCCESS") {
            $("#sumOfMoney").text(result.sumOfMoney);
        } else {
            alert("失败");
        }
    });
}